#include <stdio.h>
#include <string.h>

#define MAXLEN            10000
#define STACK_DATA_TYPE   char

const char opening_br = '<';
const char closing_br = '>';

/* {{{ CTAKAH */
#ifndef STACK_H
#define STACK_H

#ifndef NMAX
const int NMAX = 500000;
#endif /* #ifndef NMAX */

#ifndef STACK_DATA_TYPE
#define STACK_DATA_TYPE int
#endif /* #ifndef STACK_DATA_TYPE */
struct Stack {
	STACK_DATA_TYPE data[NMAX];
	int size;
};
#endif /* #ifndef STACK_H */


extern void
Clear(struct Stack * s)
{
	s->size = 0;
}



extern void
Push(struct Stack * s, STACK_DATA_TYPE new_)
{
	s->data[s->size] = new_;
	++(s->size);
}



extern STACK_DATA_TYPE
Pop(struct Stack * s)
{
	if (s->size)
		--s->size;
	return s->data[s->size];
}



extern STACK_DATA_TYPE
Top(const struct Stack * s)
{
	return s->data[s->size - 1];
}



extern unsigned char
IsEmpty(const struct Stack * s)
{
	return s->size ? 0 : 1;
}
/* }}} */


void
remove_tags(register char * p)
{
	register char *p_next, *p_end_of_tag;
	if (p_next = strchr(p, opening_br)) {
		remove_tags(p_next+1);
		if (p_end_of_tag = strchr(p_next, closing_br)) {
			while (*p_end_of_tag) {
				*p_next++ = *(++p_end_of_tag);
			}
		}
	}
}



int
main(int argc, char ** argv)
{
	struct Stack s;
	char line[MAXLEN+3];
	register short i = 0;
	register char *ptr;

	(void) freopen("tags.in", "r", stdin);
	(void) freopen("tags.out", "w", stdout);

	Clear(&s);
	ptr = fgets(line, MAXLEN+1, stdin);
	remove_tags(ptr);
	printf("%s", line);
	return 0;
}
// vim:foldmethod=marker:
